import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/register',
    name: 'register',
    component: () => import(/* webpackChunkName: "about" */ '../views/RegisterPage.vue')
  },
  {
    path: '/',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/LoginPage.vue')
  },
  {
    path:'/alter',
    name:'AlterPass',
    component: () => import('../views/AlterPass.vue')
  },
  {
    path:'/StuHome',
    name:'StuHome',
    component: () => import('../views/StuHome.vue')
  },
  {
    path:'/TeaHome',
    name:'TeaHome',
    component: () => import('../views/TeaHome.vue')
  },
  {
    path:'/AdminPage',
    name:'AdminPage',
    component: () => import('../views/admin/AdminPage.vue'),
    redirect:'/AdminPage/UserPage',
    children:[
      {
        path:'/AdminPage/UserPage',
        component: () => import('../views/admin/UserPage.vue'),
      },
      {
        path:'/AdminPage/PowerPage',
        component: () => import('../views/admin/PowerPage.vue'),
      }
    ]
  },
  {
    path:'/StuPage',
    name:'StuPage',
    component: () => import('../views/StuPage.vue')
  },
  {
    path:'/TeaPage',
    name:'TeaPage',
    component: () => import('../views/TeaPage.vue')
  },
  {
    path:'/StuCourse/:id',
    name:'StuCourse',
    component: () => import('../views/StuCourse.vue')
  },
  {
    path:'/TeaCourse/:id',
    name:'TeaCourse',
    component: () => import('../views/TeaCourse.vue')
  },
  {
    path:'/CommitPage/:id',
    name:'CommitPage',
    component: () => import('../views/StuTask/Unfinished/CommitPage.vue')
  },
  {
    path:'/DescribePage/:id',
    name:'DescribePage',
    component: () => import('../views/StuTask/Unfinished/DescribePage.vue')
  },
  {
    path:'/FinCommit/:id',
    name:'FinCommit',
    component: () => import('../views/StuTask/Finished/FinCommit.vue')
  },
  {
    path:'/FinishedDescribe/:id',
    name:'FinishedDescribe',
    component: () => import('../views/StuTask/Finished/FinishedDescribe.vue')
  },
  {
    path:'/TeaAssessment/:id',
    name:'TeaAssessment',
    component: () => import('../views/StuTask/Finished/TeaAssessment.vue')
  },
  {
    path:'/FaBu',
    name:'FaBu',
    component: () => import('../views/TeaTask/FaBu.vue')
  },
  {
    path:'/LieBiao/:id',
    name:'LieBiao',
    component: () => import('../views/TeaTask/LieBiao.vue')
  },
  {
    path:'/NeiRong/:id',
    name:'NeiRong',
    component: () => import('../views/TeaTask/NeiRong.vue')
  },
  {
    path:'/PiGai/:id',
    name:'PiGai',
    component: () => import('../views/TeaTask/PiGai.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
